﻿<?xml version="1.0" encoding="utf-8" ?> 

<lzr:rulesheet name="FAI Standards">
	<lzr:rulesets>
		<lzr:ruleset type="Database">
			<lzr:rules>
				<lzr:rule type="Table">
					<lzr:name-rule use-entity-name="True" prefix="tbl" />
					<lzr:index-rule use-entity-name="True" format="UpperScore" prefix="IDX_" />
					<lzr:reference-rule use-entity-name="True" format="UpperScore" prefix="FK_" />
					<!-- A Surrogate PK Rule will create a PK with the specified naming rules and datatype, if a PK is not already specified. -->
					<lzr:pk-rule type="Surrogate" use-entity-name="False" suffix="PKID" data-type="Identity" />
					<lzr:fk-rule use-entity-name="false" suffix="Id" />
				</lzr:rule>
			</lzr:rules>
		</lzr:ruleset>
		<lzr:ruleset type="Analysis">
			<lzr:rules>
				<lzr:rule type="Fact">
					<lzr:name-rule use-entity-name="true" suffix=" Fact" />
					<lzr:index-rule use-entity-name="True" prefix="IDX_" />
					<lzr:reference-rule use-entity-name="True" prefix="FK_" />
					<!-- A Natural PK Rule will create a PK out of the entity's non-LOB (TEXT, BINARY) fields, if a PK is not specified. -->
					<lzr:pk-rule type="Natural" />
					<lzr:fk-rule use-entity-name="false" suffix=" Key" />
				</lzr:rule>
				<lzr:rule type="Dimension">
					<lzr:name-rule use-entity-name="true" suffix=" Dimension" />
					<lzr:index-rule use-entity-name="True" prefix="IDX_" />
					<lzr:reference-rule use-entity-name="True" prefix="FK_" />
					<lzr:pk-rule type="Surrogate" use-entity-name="True" suffix=" Key" data-type="Identity" />
					<lzr:fk-rule use-entity-name="false" suffix=" Key" />
				</lzr:rule>
				<lzr:rule type="Bridge">
					<lzr:name-rule use-entity-name="true" suffix=" Bridge" />
					<lzr:index-rule use-entity-name="True" prefix="IDX_" />
					<lzr:reference-rule use-entity-name="True" prefix="FK_" />
					<lzr:pk-rule type="Natural" />
					<lzr:fk-rule use-entity-name="false" suffix=" Key" />
				</lzr:rule>
			</lzr:rules>
		</lzr:ruleset>
	</lzr:rulesets>
</lzr:rulesheet>
